<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link href="../css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
    <link href="../css/back/style.css" rel="stylesheet">
    <script src="../js/vue.min.js"></script>
    <title>新增学员</title>
</head>
<body>
<div id="allContent">
    <div class="panel panel-warning addDiv" style="margin-top: 100px; height: 300px; width: 500px">
        <div class="panel-heading">更改考试信息</div>
        <div class="panel-body">
            <form method="post" id="addForm" action="../admin_examInfo_update" enctype="multipart/form-data">
                <input type="hidden" v-model="examInfo.id" name="id">
                <table class="addTable">
                    <tbody>
                    <tr>
                        <td>时间</td>
                        <td>
                            <label>
                                <input type="datetime-local" class="form-control" name="dateStr" required>
                            </label>
                        </td>
                    </tr>
                    <tr>
                        <td>地点</td>
                        <td>
                            <label>
                                <input v-model="examInfo.place" type="text" class="form-control" name="place" required>
                            </label>
                        </td>
                    </tr>
                    <tr>
                        <td>车型</td>
                        <td>
                            <label>
                                <select v-model="examInfo.carModel" name="carModel" class="form-control">
                                    <option value="A1">A1</option>
                                    <option value="A2">A2</option>
                                    <option value="A3">A3</option>
                                    <option value="B1">B1</option>
                                    <option value="B2">B2</option>
                                    <option value="C1" selected>C1</option>
                                    <option value="C2">C2</option>
                                    <option value="C3">C3</option>
                                    <option value="C4">C4</option>
                                </select>
                            </label>
                        </td>
                    </tr>
                    <tr>
                        <td>考试类型</td>
                        <td>
                            <label>
                                <select v-model="examInfo.type" name="type" class="form-control">
                                    <option value="1">科目一</option>
                                    <option value="2">科目二</option>
                                    <option value="3">科目三</option>
                                    <option value="4">科目四</option>
                                </select>
                            </label>
                        </td>
                    </tr>
                    <tr class="submitTR">
                        <td colspan="2" align="center">
                            <button type="submit" class="btn btn-success">提 交</button>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </form>

        </div>
    </div>
</div>
<script>
    let url = "../admin_examInfo_get";
    new Vue({
        el: '#allContent',
        data: {
            examInfo: []
        },
        mounted: function () {
            self = this;
            url += decodeURI(location.search);
            fetch(url).then(function (response) {
                response.json().then(function (jsonObject) {
                    self.examInfo = jsonObject.examInfo;
                    console.log(jsonObject);
                }).catch(function (err) {
                    console.log("Fetch错误：" + err);
                })
            })
        }
    });
</script>
</body>
</html>